# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=dharma
pkgver=98.6b1e511
pkgrel=6
pkgdesc='Generation-based, context-free grammar fuzzer.'
groups=('blackarch' 'blackarch-fuzzer')
arch=('any')
url='https://github.com/MozillaSecurity/dharma'
license=('custom:unknown')
depends=('python')
makedepends=('git' 'python-setuptools')
source=("git+https://github.com/MozillaSecurity/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  python setup.py build
}

package() {
  cd $pkgname

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" *.md
  install -Dm 644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

